const file = '信号控制系统应用占比情况';
const fontSize = 32;

const option = {
  series: [{
    type: 'pie',
    draggable: true,
    radius: ['20%', '70%'], // 设置成环形图
    roseType: false,
    itemStyle: {
      borderRadius: 16, // 设置扇区的圆角
      borderWidth: 2,
      borderColor: '#fff'
    },
    label: {
      show: true,
      formatter: '{b}', // 只显示名称和数值
      draggable: true, // 允许拖动标签
      position: 'outside',
      fontSize: fontSize
    },
    labelLayout: {
      draggable: true,
      moveOverlap: 'shiftY'
    },
    labelLine: {
      show: true,
      length: 20,
      length2: 30,
      smooth: true
    },
    data: [
      {
        name: '易博(2499)',
        value: 2000,
        label: {
          show: true,
          draggable: true,
          fontSize: fontSize
        },
        itemStyle: { color: '#5470c6' }
      },
      {
        name: '莱斯(1015)',
        value: 800,
        label: {
          show: true,
          draggable: true
        },
        itemStyle: { color: '#91cc75' }
      },
      {
        name: '大为(192)',
        value: 280,
        label: {
          show: true,
          draggable: true
        },
        itemStyle: { color: '#fac858' }
      },
      {
        name: '海康(106)',
        value: 120,
        label: {
          show: true,
          draggable: true
        },
        itemStyle: { color: '#ee6666' }
      },
      {
        name: '东土(36)',
        value: 110,
        label: {
          show: true,
          draggable: true
        },
        itemStyle: { color: '#73c0de' }
      },
      {
        name: '千方(1)',
        value: 80,
        label: {
          show: true,
          draggable: true
        },
        itemStyle: { color: '#fc8452' }
      },
      {
        name: '中电治安(1)',
        value: 80,
        label: {
          show: true,
          draggable: true
        },
        itemStyle: { color: '#a858fc' }
      }
    ]
  },
  {
    type: 'pie',
    draggable: true,
    itemStyle: {
      borderRadius: 16, // 设置扇区的圆角
      borderWidth: 2,
    },
    radius: ['20%', '70%'],
    labelLine: {
      show: false
    },
    labelLayout: {
      draggable: true,
      moveOverlap: 'shiftY'
    },
    label: {
      show: true,
      position: 'inside',
      formatter: '{b}', // 显示百分比
      fontSize: fontSize,
      color: '#fff',
      draggable: true // 允许拖动百分比标签
    },
    data: [
      {
        value: 2000, name: '64.90%',
        itemStyle: { color: '#5470c6' }
      },
      {
        value: 800, name: '26.36%',
        itemStyle: { color: '#91cc75' }
      },
      {
        value: 280, name: '4.99%',
        itemStyle: { color: '#fac858' }
      },
      {
        value: 120, name: '2.75%', label: { fontSize: 20 },
        itemStyle: { color: '#ee6666' }
      },
      {
        value: 110, name: '0.94%', label: { fontSize: 18 },
        itemStyle: { color: '#73c0de' }
      },
      // { value: 100, name: '0.5%', label: { fontSize: 16 } },
      {
        value: 80, name: '0.03%', label: { fontSize: 14 },
        itemStyle: { color: '#fc8452' }
      },
      {
        value: 80, name: '0.03%', label: { fontSize: 14 },
        itemStyle: { color: '#a858fc' }
      }
    ]
  }]
};